const baseUrLKey = 'SWAGGER_UI_HAND_BASE_URL_KEY_TEST'
const baseUrLListKey = 'SWAGGER_UI_HAND_BASE_URL_LIST_KEY_TEST'

export function saveTestBaseUrl(baseUrL) {
  localStorage.setItem(baseUrLKey, baseUrL)
}

export function getTestBaseUrl() {
  return localStorage.getItem(baseUrLKey)
}

export function saveTestBaseUrlList(baseUrL) {
  localStorage.setItem(baseUrLListKey, baseUrL)
}

export function getTestBaseUrlList() {
  const item = localStorage.getItem(baseUrLListKey)
  if (item !== null && item.length !== 0) {
    return JSON.parse(item)
  }
  return null
}
